package com.zxj.shop.admin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zxj.shop.admin.entity.SysLog;
import com.zxj.shop.admin.mapper.LogMapper;
import com.zxj.shop.admin.service.SystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SystemServiceImpl extends ServiceImpl<LogMapper,SysLog> implements SystemService {

    @Autowired
    LogMapper logMapper;

    @Override
    public IPage<SysLog> page(Page<SysLog> objectPage) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.orderByDesc("login_time");
        return logMapper.selectPage(objectPage, wrapper);
    }
}
